package com.deng.spring.myapp.service.imp;

import com.deng.spring.myapp.entity.User;
import com.deng.spring.myapp.service.IOrderService;
import com.deng.spring.myapp.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

/**
 * @author 邓力宾
 * @date 2020/5/21 下午4:23
 * @desc
 */
@Service
public class UserServiceImpl implements IUserService {
	@Autowired
	private IOrderService orderService;
	@PostConstruct
	public void init(){
		System.out.println("UserServiceImpl postConstruct");
	}
	@Override
	public User getById(int id) {
		User user = new User();
		user.setId(1);
		user.setName("张三");
		return user;
	}
}
